The evapoRe package developed as part of the ITHACA
project at the Faculty of Environmental Sciences, Czech University of
Life Sciences Prague, Czechia. Its primary purpose is to facilitate the
download, exploration, visualization, and analysis of evapotranspiration
(ET) data. Additionally, evapoRe offers the functionality to calculate
various Potential EvapoTranspiration (PET) methods.
Like many other R packages, evapoRe has some system
requirements:
evapoRe database hosts 10 different ET data sets; one
satellite-based, four reanalysis, and five hydrological model products.
Their native specifications, as well as links to their providers, and
their respective references are detailed in the following subsections.
We have already homogenized, compacted to a single file, and stored them
in a Zenodo
repository under the following naming convention:
<data set>_<variable>_<units>_<coverage>_<start date>_<end date>_<resolution>_<time step>.nc
The evapoRe data collection was homogenized to these
specifications: * <variable> = evapotranspiration (e)
* <units> = millimeters (mm) *
<resolution> = 0.25° * <time step>
= monthly
E.g., ERA5 (Hersbach et al. 2020) would be:
era5_e_mm_global_195901_202112_025_monthly.nc
| Data Set | Spatial Resolution | Global | Land | Ocean | Temporal Resolution | Record Length | Get Data | Reference |
|---|---|---|---|---|---|---|---|---|
| GLEAM V3.0 | 0.25° | x | Monthly | 1980/01-2021/12 | Download | Martens et al. (2017) |
| Data Set | Spatial Resolution | Global | Land | Ocean | Temporal Resolution | Record Length | Get Data | Reference |
|---|---|---|---|---|---|---|---|---|
| ERA5-Land | 0.1° | x | Monthly | 1960/01-2022/12 | Download | Muñoz-Sabater et al. (2021) | ||
| ERA5 | 0.25° | x | x | x | Monthly | 1959/01-2021/12 | Download | Hersbach et al. (2020) |
| JRA-55 | 1.25° | x | Monthly | 1958/01-2021/12 | Download | Kobayashi et al. (2015) | ||
| MERRA-2 | 0.5° x 0.625° | x | Monthly | 1980/01-2023/01 | Download | Gelaro et al. (2017) |
| Data Set | Spatial Resolution | Global | Land | Ocean | Temporal Resolution | Record Length | Get Data | Reference |
|---|---|---|---|---|---|---|---|---|
| FLDAS | 0.1° | x | Monthly | 1982/01-2022/12 | Download | McNally et al. (2017) | ||
| GLDAS CLSM V2.1 | 1° | x | Monthly | 2000/01-2022/11 | Download | Rodell et al. (2004) | ||
| GLDAS NOAH V2.1 | 0.25° | x | Monthly | 2000/01-2022/11 | Download | Rodell et al. (2004) and Beaudoing and Rodell (2020) | ||
| GLDAS VIC V2.1 | 1° | x | Monthly | 2000/01-2022/11 | Download | Rodell et al. (2004) | ||
| TerraClimate | 4\(km\) | x | Monthly | 1958/01-2021/12 | Download | Abatzoglou et al. (2018) |
In this introductory demo we will first download the FLDAS data set. We will then subset the downloaded data over Central Europe for the 2001-2010 period, and crop it to the national scale for Czechia. In the next step, we will generate time series for our data sets and conclude with the visualization of our data.
NOTE: While the functions in evapoRe
are intended to work directly with its data inventory. It can handle
most other ET data sets in “.nc” format, as well as any other “.nc” file
generated by its functions.
Note: To download the latest version of
evapoRe, please make sure you have the
devtools package installed. You can install
evapoRe by running the following command in R:
devtools::install_github("AkbarR1184/evapoRe")
library(evapoRe)Downloading the entire data collection or only a few data sets is
quite straightforward. You just call the download_data
function, which has four arguments data_name, path,
domain, and time_res.
Let’s download the fldas data set and inspect its content with
show_info:
download_data(data_name = 'fldas')
fldas_global <- raster::brick('fldas_e_mm_land_198201_202212_025_monthly.nc')
show_info(fldas_global)[1] "class : RasterBrick "
[2] "dimensions : 720, 1440, 1036800, 492 (nrow, ncol, ncell, nlayers)"
[3] "resolution : 0.25, 0.25 (x, y)"
[4] "extent : -180, 180, -90, 90 (xmin, xmax, ymin, ymax)"
[5] "crs : +proj=longlat +datum=WGS84 "
[6] "source : fldas_e_mm_land_198201_202212_025_monthly.nc "
[7] "names : X1982.01.01, X1982.02.01, X1982.03.01, X1982.04.01, X1982.05.01, X1982.06.01, X1982.07.01, X1982.08.01, X1982.09.01, X1982.10.01, X1982.11.01, X1982.12.01, X1983.01.01, X1983.02.01, X1983.03.01, ... "
[8] "Date/time : 1982-01-01, 2022-12-01 (min, max)"
[9] "varname : e "
Once we have downloaded our database, we can start processing the data with:
subset_spacetime to subset the data in time and
space.subset_space to subset the data to the region of
interest.subset_time to select the years of interest.mon_to_year to aggregate the data from monthly into
annual.rescale_data to go from the native resolution (0.25°)
to coarser ones (e.g., 0.5°, 1°, 1.5°, 2°, etc).make_ts to generate a time series by taking the area
weighted average over each time step.To subset our data to a desired region and period of interest, we use
the subset_spacetime function, which has four arguments
data, years, bbox, and autosave.
Let’s subset the fldas data set over Central Europe (2,28,42,58) for
the 2001-2010 period, and inspect its content with
show_info:
fldas_subset <- subset_spacetime(fldas_global, years = c(2001, 2010), bbox = c(2,28,42,58))
show_info(fldas_subset)[1] "class : RasterBrick "
[2] "dimensions : 64, 104, 6656, 120 (nrow, ncol, ncell, nlayers)"
[3] "resolution : 0.25, 0.25 (x, y)"
[4] "extent : 2, 28, 42, 58 (xmin, xmax, ymin, ymax)"
[5] "crs : +proj=longlat +datum=WGS84 "
[6] "source : memory"
[7] "names : X2001.01.01, X2001.02.01, X2001.03.01, X2001.04.01, X2001.05.01, X2001.06.01, X2001.07.01, X2001.08.01, X2001.09.01, X2001.10.01, X2001.11.01, X2001.12.01, X2002.01.01, X2002.02.01, X2002.03.01, ... "
[8] "min values : -3.7794194221, -0.4208407104, -0.5045991540, -0.0572454371, -0.0005709816, 0.0000000000, 0.0000000000, 0.0000000000, -0.3487000465, -1.6532191038, -0.4017279446, -2.5777058601, -2.6171388626, -0.3143836856, -0.2774783075, ... "
[9] "max values : 56.90099, 69.52248, 113.14240, 125.60358, 174.75136, 190.40407, 189.30975, 155.39180, 99.69257, 76.16212, 62.63054, 47.89834, 40.91222, 68.70403, 99.67541, ... "
[10] "time : 2001-01-01, 2010-12-01 (min, max)"
To further crop our data to a desired polygon other than a rectangle,
we use the crop_data function, which has three arguments
x, shp_path, autosave.
Let’s crop our fldas subset to cover only Czechia with the respective
shape
file, and inspect its content with show_info:
fldas_cz <- crop_data(fldas_subset, shp_path = "gadm41_CZE_0.shp")
show_info(fldas_cz)[1] "class : RasterBrick "
[2] "dimensions : 64, 104, 6656, 120 (nrow, ncol, ncell, nlayers)"
[3] "resolution : 0.25, 0.25 (x, y)"
[4] "extent : 2, 28, 42, 58 (xmin, xmax, ymin, ymax)"
[5] "crs : +proj=longlat +datum=WGS84 "
[6] "source : memory"
[7] "names : X2001.01.01, X2001.02.01, X2001.03.01, X2001.04.01, X2001.05.01, X2001.06.01, X2001.07.01, X2001.08.01, X2001.09.01, X2001.10.01, X2001.11.01, X2001.12.01, X2002.01.01, X2002.02.01, X2002.03.01, ... "
[8] "min values : 2.8995819, 0.3797975, 3.0552430, 2.6468999, 2.3843012, 8.8729420, 10.6661291, 6.5048337, 3.1765358, 1.2650596, 2.0705938, 4.3670325, 8.1393061, 2.2920027, 1.8019267, ... "
[9] "max values : 19.11826, 33.55016, 46.44899, 67.51703, 154.64659, 127.61076, 148.00507, 130.79279, 60.39583, 39.82825, 25.54001, 22.27194, 30.96886, 35.84626, 53.87944, ... "
[10] "time : 2001-01-01, 2010-12-01 (min, max)"
First we need to download temperature data. To to this we will use temperature data from the Zenodo repository:
NOTE: Temperature data available at the moment is limited to monthly and covers only the land domain. The data source used for this information is TerraClimate.
we use the download_terraclimate function, which has
four arguments variable, folder_path,
time_res, and domain.
t
stands for tavg, tmin, and tmax.download_terraclimate(variable = "t", folder_path = ".")This will download temperature data in following naming convention e.g.,
terraclimate_tavg_land_19580101_20221231_025_monthly.nc
pet_calc function is calculating PET from various
method. “hs” for Hargreaves Samani method (Hargreaves and Samani 1982), “od” for
Oudin method (Oudin et al. 2005), “mb” for McGuinness
and Bordne method (McGuinness and
Bordne 1972), “jh” for Jensen Haise method (Jensen and Haise 1963), and “br” for
Baier and Robertson (Baier and Robertson
1965).
Let’s calculate PET from Oudin method. Then, same as fldas we can
subset it over Central Europe for the 2001-2010 period, and Czechia and
inspect its content with show_info:
tavg_brick <- raster::brick("terraclimate_tavg_land_19580101_20221231_025_monthly.nc")
pet_oudin_global <- pet_calc(method = "od", tavg = tavg_brick)
show_info(pet_oudin_global)[1] "class : RasterBrick "
[2] "dimensions : 720, 1440, 1036800, 780 (nrow, ncol, ncell, nlayers)"
[3] "resolution : 0.25, 0.25 (x, y)"
[4] "extent : 2, 28, 42, 58 (xmin, xmax, ymin, ymax)"
[5] "crs : +proj=longlat +datum=WGS84 +no_defs "
[6] "source : memory"
[7] "names : X1958.01.01, X1958.02.01, X1958.03.01, X1958.04.01, X1958.05.01, X1958.06.01, X1958.07.01, X1958.08.01, X1958.09.01, X1958.10.01, X1958.11.01, X1958.12.01, X1959.01.01, X1959.02.01, X1959.03.01, ... "
[8] "min values : 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ... "
[9] "max values : 211.0769, 183.8832, 180.3431, 181.3188, 208.0041, 219.7289, 233.0501, 226.3481, 191.6451, 182.9314, 191.2556, 208.2998, 216.5920, 182.6839, 189.2202, ... "
[10] "Date/time : 1958-01-01, 2022-12-01 (min, max)"
pet_oudin_subset <- subset_spacetime(pet_oudin_global, years = c(2001, 2010), bbox = c(2,28,42,58))
show_info(pet_oudin_subset)[1] "class : RasterBrick "
[2] "dimensions : 64, 104, 6656, 120 (nrow, ncol, ncell, nlayers)"
[3] "resolution : 0.25, 0.25 (x, y)"
[4] "extent : 2, 28, 42, 58 (xmin, xmax, ymin, ymax)"
[5] "crs : +proj=longlat +datum=WGS84 +no_defs "
[6] "source : memory"
[7] "names : X2001.01.01, X2001.02.01, X2001.03.01, X2001.04.01, X2001.05.01, X2001.06.01, X2001.07.01, X2001.08.01, X2001.09.01, X2001.10.01, X2001.11.01, X2001.12.01, X2002.01.01, X2002.02.01, X2002.03.01, ... "
[8] "min values : 0.0000000, 0.0000000, 0.0000000, 0.0000000, 29.6826839, 35.2862740, 56.8655243, 59.6474762, 18.5679646, 21.9732304, 0.0000000, 0.0000000, 0.0000000, 0.0000000, 0.0000000, ... "
[9] "max values : 27.54286, 30.60882, 56.41196, 71.91792, 123.63754, 144.49162, 172.22604, 164.48526, 104.05064, 82.26010, 42.09394, 24.42895, 23.70211, 33.02557, 53.42158, ... "
[10] "time : 2001-01-01, 2010-12-01 (min, max)"
pet_oudin_cz <- crop_data(pet_oudin_subset, shp_path = "gadm41_CZE_0.shp")
show_info(pet_oudin_cz)[1] "class : RasterBrick "
[2] "dimensions : 64, 104, 6656, 120 (nrow, ncol, ncell, nlayers)"
[3] "resolution : 0.25, 0.25 (x, y)"
[4] "extent : 2, 28, 42, 58 (xmin, xmax, ymin, ymax)"
[5] "crs : +proj=longlat +datum=WGS84 +no_defs "
[6] "source : memory"
[7] "names : X2001.01.01, X2001.02.01, X2001.03.01, X2001.04.01, X2001.05.01, X2001.06.01, X2001.07.01, X2001.08.01, X2001.09.01, X2001.10.01, X2001.11.01, X2001.12.01, X2002.01.01, X2002.02.01, X2002.03.01, ... "
[8] "min values : 1.656290, 3.878582, 11.940824, 28.756351, 71.201210, 79.335274, 104.388397, 97.543289, 49.243000, 36.703739, 7.096017, 0.000000, 1.901990, 7.945362, 14.307798, ... "
[9] "max values : 5.0574903, 9.8281002, 26.4252815, 48.3378906, 97.8983765, 108.8017654, 135.4944000, 125.5629272, 67.6883392, 48.5421448, 13.8211985, 3.3882675, 5.2703271, 13.7232389, 26.8243675, ... "
[10] "time : 2001-01-01, 2010-12-01 (min, max)"
To make a time series out of our data, we use the
make_ts function, which has two arguments data,
and autosave.
Let’s generate the time series for our three different fldas data sets (Global, Central Europe, and Czechia), and inspect its first 12 rows:
fldas_global_ts <- make_ts(fldas_global, name="fldas")
head(fldas_global_ts, 12) date value name type
1: 1982-01-01 40.01818 FLDAS Model forcing
2: 1982-02-01 39.05691 FLDAS Model forcing
3: 1982-03-01 45.63258 FLDAS Model forcing
4: 1982-04-01 48.38817 FLDAS Model forcing
5: 1982-05-01 56.04541 FLDAS Model forcing
6: 1982-06-01 59.48527 FLDAS Model forcing
7: 1982-07-01 63.42378 FLDAS Model forcing
8: 1982-08-01 58.08678 FLDAS Model forcing
9: 1982-09-01 47.53051 FLDAS Model forcing
10: 1982-10-01 43.30959 FLDAS Model forcing
11: 1982-11-01 39.14826 FLDAS Model forcing
12: 1982-12-01 39.41859 FLDAS Model forcing
fldas_subset_ts <- make_ts(fldas_subset, name="fldas")
head(fldas_subset_ts, 12) date value name type
1: 2001-01-01 14.47523 FLDAS Model forcing
2: 2001-02-01 24.55700 FLDAS Model forcing
3: 2001-03-01 43.77176 FLDAS Model forcing
4: 2001-04-01 61.23033 FLDAS Model forcing
5: 2001-05-01 112.55881 FLDAS Model forcing
6: 2001-06-01 114.57058 FLDAS Model forcing
7: 2001-07-01 116.47619 FLDAS Model forcing
8: 2001-08-01 79.83941 FLDAS Model forcing
9: 2001-09-01 50.78079 FLDAS Model forcing
10: 2001-10-01 32.62168 FLDAS Model forcing
11: 2001-11-01 20.41700 FLDAS Model forcing
12: 2001-12-01 13.59456 FLDAS Model forcing
fldas_cz_ts <- make_ts(fldas_cz, name = "fldas")
head(fldas_cz_ts, 12) date value name type
1: 2001-01-01 12.23963 FLDAS Model forcing
2: 2001-02-01 23.80942 FLDAS Model forcing
3: 2001-03-01 36.08155 FLDAS Model forcing
4: 2001-04-01 50.36031 FLDAS Model forcing
5: 2001-05-01 105.76477 FLDAS Model forcing
6: 2001-06-01 95.73339 FLDAS Model forcing
7: 2001-07-01 99.95880 FLDAS Model forcing
8: 2001-08-01 80.05314 FLDAS Model forcing
9: 2001-09-01 42.28572 FLDAS Model forcing
10: 2001-10-01 24.04546 FLDAS Model forcing
11: 2001-11-01 15.01222 FLDAS Model forcing
12: 2001-12-01 12.39291 FLDAS Model forcing
Let’s generate the time series for our three different PET calculated by Oudin method (Global, Central Europe, and Czechia), and inspect its first 12 rows:
pet_oudin_global_ts <- make_ts(pet_oudin_global, name = "terraclimate")
head(pet_oudin_global_ts, 12) date value name type
1 1958-01-01 61.30534 TerraClimate Model forcing
2 1958-02-01 57.55157 TerraClimate Model forcing
3 1958-03-01 69.26975 TerraClimate Model forcing
4 1958-04-01 75.33172 TerraClimate Model forcing
5 1958-05-01 88.64012 TerraClimate Model forcing
6 1958-06-01 97.28295 TerraClimate Model forcing
7 1958-07-01 107.45549 TerraClimate Model forcing
8 1958-08-01 102.36428 TerraClimate Model forcing
9 1958-09-01 86.36096 TerraClimate Model forcing
10 1958-10-01 76.35980 TerraClimate Model forcing
11 1958-11-01 64.49735 TerraClimate Model forcing
12 1958-12-01 61.64263 TerraClimate Model forcing
pet_oudin_subset_ts <- make_ts(pet_oudin_subset, name = "terraclimate")
head(pet_oudin_subset_ts, 12) date value name type
1: 2000-01-01 2.665469 TerraClimate Model forcing
2: 2000-02-01 9.319429 TerraClimate Model forcing
3: 2000-03-01 19.722206 TerraClimate Model forcing
4: 2000-04-01 52.197863 TerraClimate Model forcing
5: 2000-05-01 87.489379 TerraClimate Model forcing
6: 2000-06-01 110.380165 TerraClimate Model forcing
7: 2000-07-01 107.296700 TerraClimate Model forcing
8: 2000-08-01 111.219882 TerraClimate Model forcing
9: 2000-09-01 65.276298 TerraClimate Model forcing
10: 2000-10-01 42.080404 TerraClimate Model forcing
11: 2000-11-01 16.396132 TerraClimate Model forcing
12: 2000-12-01 6.029927 TerraClimate Model forcing
pet_oudin_cz_ts<- make_ts(pet_oudin_cz, name = "terraclimate")
head(pet_oudin_cz_ts, 12) date value name type
1: 2000-01-01 2.643555 TerraClimate Model forcing
2: 2000-02-01 9.312819 TerraClimate Model forcing
3: 2000-03-01 19.611606 TerraClimate Model forcing
4: 2000-04-01 51.935105 TerraClimate Model forcing
5: 2000-05-01 87.271313 TerraClimate Model forcing
6: 2000-06-01 110.079202 TerraClimate Model forcing
7: 2000-07-01 106.833477 TerraClimate Model forcing
8: 2000-08-01 110.965007 TerraClimate Model forcing
9: 2000-09-01 65.153299 TerraClimate Model forcing
10: 2000-10-01 41.721005 TerraClimate Model forcing
11: 2000-11-01 16.031256 TerraClimate Model forcing
12: 2000-12-01 5.822190 TerraClimate Model forcing
Either after we have processed our data as required or right after downloaded, we have six different options to visualize our data for more information refer to visualisation section of pRecipe:
To see a map of any data set raw or processed, we use
plot_map which takes only one layer of the RasterBrick as
input.
plot_map(fldas_global[[1]])
plot_map(pet_oudin_global[[289]])
plot_map(fldas_subset[[1]])
plot_map(pet_oudin_subset[[1]])
plot_map(fldas_cz[[1]])
plot_map(pet_oudin_cz[[1]])To draw a time series generated by make_ts, we use any
of the options below, which takes only a make_ts “.csv”
generated file.
# Plotting globals
p01<- plot_line(fldas_global_ts, var = "Evapotranspiration")
p02<- plot_line(pet_oudin_global_ts, var = "Potential Evapotranspiration")
ggpubr::ggarrange(p01, p02, ncol = 1)# Plotting subsets
p01<- plot_line(fldas_subset_ts, var = "ET")
p02<- plot_line(pet_oudin_subset_ts, var = "PET")
ggpubr::ggarrange(p01, p02, ncol = 2)# Plotting cz
p01<- plot_line(fldas_cz_ts, var = "ET")
p02<- plot_line(pet_oudin_cz_ts, var = "PET")
ggpubr::ggarrange(p01, p02, ncol = 2)# Plotting globals
plot_heatmap(fldas_global_ts) plot_heatmap(pet_oudin_global_ts)# Plotting subsets
p01<- plot_heatmap(fldas_subset_ts)
p02<- plot_heatmap(pet_oudin_subset_ts)
ggpubr::ggarrange(p01, p02, ncol = 2, common.legend = TRUE, legend = "right")# Plotting cz
p01<- plot_heatmap(fldas_cz_ts)
p02<- plot_heatmap(pet_oudin_cz_ts)
ggpubr::ggarrange(p01, p02, ncol = 2, common.legend = TRUE, legend = "right")# Plotting globals
p01<- plot_box(fldas_global_ts, var = "ET")
p02<- plot_box(pet_oudin_global_ts, var = "PET")
ggpubr::ggarrange(p01, p02, ncol = 2)# Plotting subsets
p01<- plot_box(fldas_subset_ts, var = "ET")
p02<- plot_box(pet_oudin_subset_ts, var = "PET")
ggpubr::ggarrange(p01, p02, ncol = 2)# Plotting cz
p01<- plot_box(fldas_cz_ts, var = "ET" )
p02<- plot_box(pet_oudin_cz_ts, var = "PET" )
ggpubr::ggarrange(p01, p02, ncol = 2)# Plotting globals
p01<- plot_density(fldas_global_ts, var = "ET")
p02<- plot_density(pet_oudin_global_ts, var = "PET")
ggpubr::ggarrange(p01, p02, ncol = 2)# Plotting subsets
p01<- plot_density(fldas_subset_ts, var = "ET")
p02<- plot_density(pet_oudin_subset_ts, var = "PET")
ggpubr::ggarrange(p01, p02, ncol = 2)# Plotting cz
p01<- plot_density(fldas_cz_ts, var = "ET")
p02<- plot_density(pet_oudin_cz_ts, var = "PET")
ggpubr::ggarrange(p01, p02, ncol = 2)NOTE: For good aesthetics we recommend saving
plot_summary with
ggsave(<filename>, <plot>, width = 16.3, height = 15.03).
plot_summary(fldas_global_ts, var = "Evapotranspiration")
#plot_summary(fldas_subset_ts)
#plot_summary(fldas_cz_ts)plot_summary(pet_oudin_global_ts, var = "Potential Evapotranspiration")
#plot_summary(pet_oudin_subset_ts)
#plot_summary(pet_oudin_cz_ts)We will introduce significant enhancements to ET database and PET calculation methods. This expansion builds upon our existing temperature-based approach and incorporates a radiation-based PET calculation methods, along with an expanded range of temperature-based methods. Our aim is to provide users with a more comprehensive and accurate estimation of ET and PET, catering to a broader range of applications and requirements.